Integrating Emacs

Prerequisites

- SNiFF+ installed at your site
- GNU Emacs (version 19 or later) or XEmacs (formerly Lucid Emacs) installed at your site
- The

sniff-mode.el file (part of the SNiFF+ package)
Setting Emacs as your preferred editor

Start SNiFF+.
Choose Tools > Preferences in any open SNiFF+ tool.

In the Preferences dialog

Select the Tools > Source Editor node.
From the Current Editor drop-down, choose Emacs/Vim.
Press Ok.
SNiFF+ will now use Emacs for all editing requests.

Switching Emacs to SNiFF+ mode

- Add the following line to your

.emacs file
(load "$SNIFF_DIR/config/sniff-mode")
This causes Emacs to load the sniff-mode.el configuration file at start-up.

| Note
| You can avoid the path specification by copying sniff-mode.el to the directory for site-wide Emacs-Lisp files: cp $SNIFF_DIR /config/sniff-mode.el /usr/local/ lib/emacs/site-lisp After you have done this, your .emacs file entry would look like this: (load "sniff-mode")

Connecting Emacs to SNiFF+

- To connect Emacs to a running SNiFF+ session, type:

M-x sniff-connect

| Note
| You could also add this command to your .emacs file. Then, your .emacs would look like this: (load "$SNIFF_DIR/config/sniff-mode") (sniff-connect)

Note that you can have only one Emacs-SNiFF+ connection active at a given time.

- To force Emacs to disconnect from SNiFF+, type:
M-x sniff-disconnect
Note that Emacs automatically disconnects when you end a current SNiFF+ session.